You are here: Trading System Programming > Reference > Classes > Order > Order Methods > getStopPrice

getStopPrice

The getStopPrice method returns order's stop price.

Syntax

var getStopPrice();

Return Value

This method returns stop price as a floating value.

Example

The following example demonstrates the use of getStopPrice() method.

 

function start()

{

//retrieve account's open orders

var account = getAccount();

var openOrders = account.getOrders();

 

//loop through all orders

for(var i = 0; i < openOrders.length, i++)

{

var order = openOrders[i];

 

if(order.getOrderType() == ORDERTYPE_STOP || order.getOrderType() == ORDERTYPE_STOPLIMIT)

{

//get stop Price

var stopPrice = order.getStopPrice();

}

}

 

//proceed further...

}

 


Copyright © 2006-2009 ActiveTick LLC